package com.zmx.job.admin.conf;

import org.springframework.stereotype.Component;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @Description:
 * @ClassName: MyWebMvcConfigurer
 * @Author zhaomxr
 * @Date 2021-12-24 14:58
 */
@Component
public class MyWebMvcConfigurer implements WebMvcConfigurer {

    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        //将所有/static/** 访问都映射到classpath:/static/ 目录下
        registry.addResourceHandler("/static/**/").addResourceLocations("classpath:/static/");
    }
}
